let arr={
  "1":true,
  "2":false,
  "3":"123",
  "4":12
}

$.each(arr,function(i,val){

      if(typeof(val) != "number" && typeof(val) != "boolean"){
          alert("字符串");

      }else{
          alert("数字或布尔");
      }


})